using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Data
{
    /// <summary>
    /// Controller class for Orders
    /// </summary>
    public partial class userController
    {


		
	    /// <summary>
	    /// Inserts a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
	    public void Insert(
                                        String 
                            UserID
                            , 
                            String 
                            UserName
                            , 
                            String 
                            Password
                            , 
                            String 
                            Email
                            , 
                            String 
                            Address
                            , 
                            String 
                            Phone
                            , 
                            String 
                            DOB
                            , 
                            String 
                            Description
                            , 
                            String 
                            Active
                            , 
                            Int32 
                            UserType
                            , 
                            DateTime 
                            CreatedDate
                            , 
                            DateTime 
                            UpdateDate
            )
	    {		
			user item = new user();
			
			item.UserID = UserID;
			item.UserName = UserName;
			item.Password = Password;
			item.Email = Email;
			item.Address = Address;
			item.Phone = Phone;
			item.DOB = DOB;
			item.Description = Description;
			item.Active = bool.Parse(Active);
			item.UserType = UserType;
			item.CreatedDate = CreatedDate;
			item.UpdateDate = UpdateDate;
		    item.Save("");
	    }

	    /// <summary>
	    /// Updates a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
	    public void Update( String  UserID,  String  UserName,  String  Password,  String  Email,  String  Address,  String  Phone,  String  DOB,  String  Description,  String  Active,  Int32  UserType,  DateTime  CreatedDate,  DateTime  UpdateDate)
		{
			user item = new user();
			
			item.UserID = UserID;
			item.UserName = UserName;
			item.Password = Password;
			item.Email = Email;
			item.Address = Address;
			item.Phone = Phone;
			item.DOB = DOB;
			item.Description = Description;
			item.Active = bool.Parse(Active);
			item.UserType = UserType;
			item.CreatedDate = CreatedDate;
			item.UpdateDate = UpdateDate;
		    item.MarkOld();
		    item.Save("");		
	    }
    }

}
